primeNum=2
targetNum=3
num=4

while primeNum<10001:
    for i in range(2, int(num**0.5+1)):
        if num%i==0:
            break
    else:
        targetNum=num
        primeNum+=1
    num+=1
print targetNum
